<!-- <!DOCTYPE html> -->
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv='Content-type' content='text/htm'>
    <title>在线相册信息管理</title>
    <script>
        function delConfirm(url) {
            if(confirm("确定删除？")){
                window.location=url
            }
        }
    </script>
</head>
<body class="text-center">
        {% include "photomanageapp/photo/menu.html" %}
        <h3 class="title2">浏览相册信息</h3>
        <table class="table">
            <thead>
            <tr>
                <th>id号</th>
                <th>标题</th>
                <th>图片</th>
                <th>时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {% for photo in photodata %}
                <tr>
                    <td>{{ photo.id }}</td>
                    <td class="text-left">{{ photo.title }}</td>
                    <td><img src="/static/uploadpics/s_{{ photo.photoUrl }}" /></td>
                    <td>{{ photo.updateTime | date:'Y-m-d H:i:s' }}</td>
                    <td>
                        <a href="{% url 'editPhoto' photo.id %}">编辑</a>
                        <a href="javascript:delConfirm('{% url 'delPhoto' photo.id %}')">删除</a>
                    </td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
        <div class="page">
            {% for i in pagelist %}
                <a href="/photos/?pg={{ i }}">{{ i }}</a>
            {% endfor %}
        </div>
    </div>
</body>
</html>